home *** CD-ROM | disk | FTP | other *** search
- man v3.0.2 92/10/11
- -------------------
-
- This is a man(1) program, to be used in conjunction with manpager (which
- I concurrently posted). It is fairly robust, patterned after BSD unix man.
- It requires ul(1) and cat(1), if the "-" and "-ul" options are used,
- whatis(1) if the "-f" option is used, apropos(1) for the "-k" option, and
- always needs either less (setenv PAGER c:\bin\less.ttp) or manpager
- (setenv MANPAGER c:\bin\manpager.ttp). One of these is required, or you
- can setenv PAGER to your own prefered pager. Personally, I think less
- is superior over pg or more. And this version is really oriented toward
- using manpager, for reading nroff v1.10p4 manpages (with font changes).
-
- NOTE: the manpage posted here, "man.1", uses special escape sequences
- for changing fonts, so it must be viewed with manpager to get the full
- effect. You can also use less or emacs, in a pinch.
-
- What is nice about this man, is that it can deal with files compressed
- with compress(1), using the "-z" switch in manpager (less does not support
- this directly) without resorting to something like "zcat file | less".
- I tested man and manpager with the compress on atari.archive.umich.edu
- (terminator) which is v4.3, 16-bit. For more on this, see manpager docs.
-
- Incidently, when I say "man(1)", the "(1)" refers to the section of the
- unix programmer's manual (more on this below). Section 1 is user commands.
- It is just the way things are refered to in unix-land.
-
- I was going to post apropos(1), whatis(1), and whatisin(1), but they need
- more work before I do. No timeframe for this. Sorry.
-
- Anyway, it is pretty simple to use. To set up a manpage directory, do this:
-
- 1) mkdir c:\man (this is the root of the manpage tree, the default
- in the program, too, but you can use anything you like).
-
- 2) cd c:\man
- mkdir man0 man1 man2 man3 man4 man5 man6 man7 man8
- mkdir manl mano mann. You will place formatted manpages in this
- tree (those already run through nroff). Normally, these would be
- called "catpages" and placed in .\cat*. man does NOT invoke nroff!
-
- 3) copy man.ttp to your bin directory and rehash your shell. man can
- also be run from the desktop, but you need an environment if you
- want to override the default man directory.
-
- 4) setenv MANDIR c:\man (or whatever).
-
- 5) setenv MANPAGER c:\bin\manpager.ttp.
-
- 6) put some manpages in the c:\man\man* directories as follows (note
- that file extensions ARE important and MUST correspond to the
- last char of the subdirectory):
-
- subdir filename description
-
- man0 *.0 general information
- man1 *.1 commands
- man2 *.2? system calls, my convention is
- *.2 normal unix system calls
- *.2g gemdos
- *.2b bios
- *.2x xbios
- man3 *.3? libraries, normal unix convention is
- *.3 general libc
- *.3s stdio (fopen, etc)
- *.3m math (sin, etc)
- *.3c compatibility
- *.3x others
- man4 *.4 devices, special files (for dev drivers
- on unix, i use it for things like
- sound.4, dma.4, etc)
- man5 *.5 file formats (e.g. arc.5, ar.5, tar.5)
- man6 *.6 games
- man7 *.7 misc
- man8 *.8 system administration (e.g. ramdisk.8)
- manl *.l local commands specific to your setup
- mano *.o old manpages (replaced with newer)
- mann *.n new manpages (for testing prior to
- install)
-
- You can start with man's manpage (cp man.1 c:\man\man1).
-
- 7) run man (man man) if you copied man.1 to c:\man\man1. You do not
- specify the section in the file name. note that
- if you have 2 manpages called "xyz" (i.e. xyz.1 and xyz.2), man
- will ALWAYS find xyz.1 and never the other. if you want xyz.2,
- you should specify the section as in "man 2 xyz".
-
- 8) if you want to use the -k and -f options, you will have to build
- a whatis(1) database, which is simply the NAME text from manpages,
- one per single line. the whatis entry for man is:
-
- man - read online documentation
-
- "whatis" is a file which goes in c:\lib. a sample is included
- here. Each time you add a manpage to the system, add the NAME line
- to whatis in the format specified (see whatis file). my own file
- has about 600 entries!
-
- You don't have to stick with these (BSD) conventions, but it will make life
- simpler. At any rate, the program requires the directory stucture and searches
- there. See the manpage (or source) for the search order. Try to put only
- unix commands in man1 (putting other commands like uniterm) in manl. I have
- hundreds of files in man1, and it gets to be a pain after a while.
-
- Note that it is not necessarily to have a manpage for 2 commands or functions
- which share the same manpage. You can "source" a manpage from another by
- placing a single line in the file with a line such as:
-
- .so man3\fclose.3s
-
- This is the manpage for fflush(3S). It uses the manpage for fclose(3S).
-
- Someday, I may post manpages for sections 2 (bios, xbios, gemdos) and possibly
- section 3 (dlibs, gemlib, etc). Don't hold your breath, though :-).
-
-
- Enjoy...
-
-
- -Bill Rosenkranz
- rosenkra@convex.com
-
-
-